package edu.njust.cma.mapper;

import edu.njust.cma.pojo.StandardMethod;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StandardMethodMapper {

    @Insert("insert into standardMethods (standard_id, method_name) values (#{standardId}, #{methodName})")
    void addStandardMethod(int standardId, String methodName);

    @Select("select * from standardMethods where standard_id=#{standardId}")
    List<StandardMethod> findById(int standardId);

    @Select("select method_name from standardMethods where standard_id=#{standardId}")
    List<String> getStandardMethod(int standardId);

}
